package com.bsoft.gol.hcs.specialist.entity;

/**
 * @Author:FangZhiYi
 * @Description 随访因素时间枚举
 * @Data Created in 2022/5/27 11:30
 * @Moddified By:
 */
public enum FactorTimeEnum {
    FULL_THREE_DAY((byte)1,(byte)1,3,"满3天"),
    FULL_ONE_WEEK((byte)2, (byte)1,7,"满1周 "),
    FULL_ONE_MONTH((byte)3, (byte)1,30,"满1月"),
    FULL_ONE_YEAR((byte)4, (byte)1,365,"满1年"),
    WITHIN_THREE_DAY((byte)5, (byte)2,3,"3天内"),
    WITHIN_ONE_WEEK((byte)6, (byte)2,7,"1周内"),
    WITHIN_ONE_MONTH((byte)7, (byte)2,30,"1月内"),
    WITHIN_ONE_YEAR((byte)8, (byte)2,365,"1年内");

    //防止字段值被修改，增加的字段也统一final表示常量
    private final Byte key;
    private final Byte factorTimeType;
    private final Integer factorTimeNumber;
    private final String remarks;

    private FactorTimeEnum(Byte key, Byte factorTimeType, Integer factorTimeNumber, String remarks) {
        this.key = key;
        this.factorTimeType = factorTimeType;
        this.factorTimeNumber = factorTimeNumber;
        this.remarks = remarks;
    }

    //根据key获取枚举
    public static FactorTimeEnum getEnumByKey(Byte key) {
        if (null == key) {
            return null;
        }
        for (FactorTimeEnum temp : FactorTimeEnum.values()) {
            if (temp.getKey().equals(key)) {
                return temp;
            }
        }
        return null;
    }

    public Byte getKey() {
        return key;
    }

    public Byte getFactorTimeType() {
        return factorTimeType;
    }

    public Integer getFactorTimeNumber() {
        return factorTimeNumber;
    }

    public String getRemarks() {
        return remarks;
    }
}
